import cv2
import numpy as np

img = cv2.imread("C:\\Users\\86191\\Pictures\\Saved Pictures\\Camera Roll\\kc.jpg")
h,w,ch = img.shape
# 平移
#M = np.float32([[1,0,400],[0,1,0]])

# 变换矩阵之一
# M = cv2.getRotationMatrix2D((100,100),60,1)

# 变换矩阵之二
# 原始点集
src = np.float32([[100,200],[300,200],[100,250]])
# 目标点集
dst = np.float32([[100,200],[460,330],[456,150]])
M = cv2.getAffineTransform(src,dst)

cv2.imshow("Original",img)
# new_img = cv2.warpAffine(img,M,(w,h))
# cv2.imshow('img',new_img)
cv2.waitKey(0)
